import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '省编码',
    align:"center",
    dataIndex: 'province'
   },
   {
    title: '省名称',
    align:"center",
    dataIndex: 'provinceName'
   },
   {
    title: '市编码',
    align:"center",
    dataIndex: 'city'
   },
   {
    title: '市名称',
    align:"center",
    dataIndex: 'cityName'
   },
   {
    title: '区编码',
    align:"center",
    dataIndex: 'area'
   },
   {
    title: '区名称',
    align:"center",
    dataIndex: 'areaName'
   },
   {
    title: '启用状态',
    align:"center",
    dataIndex: 'enablestate_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '省编码',
    field: 'province',
    component: 'Input',
  },
  {
    label: '省名称',
    field: 'provinceName',
    component: 'Input',
  },
  {
    label: '市编码',
    field: 'city',
    component: 'Input',
  },
  {
    label: '市名称',
    field: 'cityName',
    component: 'Input',
  },
  {
    label: '区编码',
    field: 'area',
    component: 'Input',
  },
  {
    label: '区名称',
    field: 'areaName',
    component: 'Input',
  },
  {
    label: '启用状态',
    field: 'enablestate',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"enablestate"
     },
  },
	// TODO 主键隐藏字段，目前写死为ID
	{
	  label: '',
	  field: 'id',
	  component: 'Input',
	  show: false
	},
];

// 高级查询数据
export const superQuerySchema = {
  province: {title: '省编码',order: 0,view: 'text', type: 'string',},
  provinceName: {title: '省名称',order: 1,view: 'text', type: 'string',},
  city: {title: '市编码',order: 2,view: 'text', type: 'string',},
  cityName: {title: '市名称',order: 3,view: 'text', type: 'string',},
  area: {title: '区编码',order: 4,view: 'text', type: 'string',},
  areaName: {title: '区名称',order: 5,view: 'text', type: 'string',},
  enablestate: {title: '启用状态',order: 6,view: 'number', type: 'number',dictCode: 'enablestate',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}